import request from "@/utils/request";

//信息
export function getInfo(id) {
  return request({
    url: '/api/visit/RkMarketLog/' + (!!id ? id : 0),
    method: 'GET'
  })
}

//销售日志新增
export function addMarketLog(_data) {
  return request({
    url: '/api/visit/RkMarketLog',
    method: 'post',
    data: _data
  })
}

//销售日志修改
export function updateMarketLog(_data, id) {
  return request({
    url: '/api/visit/RkMarketLog/' + id,
    method: 'put',
    data: _data
  })
}

//关联外出拜访记录
export function visitList(id) {
  return request({
    url: '/api/visit/RkMarketLog/visit/' + id,
    method: 'get',
  })
}

//关联外出项目记录
export function projectList(id) {
  return request({
    url: '/api/visit/RkMarketLog/project/' +id,
    method: 'get',
  })
}

// 信息详情
export function getDetail(id) {
  return request({
    url: '/api/visit/RkMarketLog/detail/' + (!!id ? id : 0),
    method: 'GET'
  })
}
